<div class="container-fluid cm-container-white section-title">
    <h1>Custom Files</h1>

    <p>Information on dotfiles and custom executable bash files</p>
</div>

<div id="custom_files-container"
     class="container-fluid collapse in">
    <div class="panel panel-default">
        <div class="panel-body">
            <fieldset>
                <legend>dotfiles</legend>

                <div class="col-xs-12">
                    <p>You can add all your dot files (
                        <code>.bash_aliases</code>, <code>.vimrc</code>,
                        <code>.gitconfig</code>, etc),
                        to the <code>puphpet/files/dot/</code> folder that will appear after
                        you extract your generated zip file.</p>

                    <p>During initial startup, they will automatically be copied into the VM.
                        There is a sample <code>.bash_aliases</code> file there for you to
                        start with - overwrite at will!</p>
                </div>
            </fieldset>

            <div class="clearfix"></div>

            <fieldset>
                <legend>Custom Bash Files</legend>

                <div class="col-xs-12">
                    <p>You can run your own custom code after the VM finishes provisioning by adding files to the
                        <code>puphpet/files/exec-always</code>, <code>puphpet/files/exec-always-unprivileged</code>,
                        <code>puphpet/files/exec-once</code>, <code>puphpet/files/exec-once-unprivileged</code>,
                        <code>puphpet/files/startup-always</code>,
                        <code>puphpet/files/startup-always-unprivileged</code>,
                        <code>puphpet/files/startup-once</code> and <code>puphpet/files/startup-once-unprivileged</code>
                        folders.</p>

                    <p><strong>Files are executed in alphabetical order</strong>, and filenames must end in <code>.sh</code>.
                        Files within <code>exec-once-*</code> are run before files within <code>exec-always-*</code>,
                        and files within <code>startup-once-*</code> are run before files within <code>startup-always-*</code>.
                        Files in <code>exec-once-*</code> and <code>exec-always-*</code> are run before files in
                        <code>startup-once-*</code> and <code>startup-always-*</code>.</p>

                    <p>Files within <code>*-unprivileged</code> are run as the default user while the other ones area run
                        using sudo. Files within <code>*-unprivileged</code> are run after all other files on the same
                        running order as "privileged" files.</p>

                    <p>Files within <code>exec-always-*</code> will run on initial <code>$ vagrant up</code> and all
                        <code>$ vagrant provision</code>, while files within <code>exec-once-*</code> will
                        run only the first time you run Vagrant, unless you SSH into the VM and remove the
                        <code>/.puphpet-stuff/exec-once-ran</code> and/or
                        <code>/.puphpet-stuff/exec-once-unprivileged-ran</code>
                        files and re-run Vagrant.</p>

                    <p>Files within <code>startup-always-*</code> will run on each <code>$ vagrant up</code>,
                        while files within <code>startup-once-*</code> will only run on the next time you run Vagrant,
                        unless you SSH into the VM and remove the <code>/.puphpet-stuff/startup-once-ran</code>
                        and/or <code>/.puphpet-stuff/startup-once-unprivileged-ran</code> files and re-run Vagrant.</p>
                </div>
            </fieldset>

            <div class="clearfix"></div>
        </div>
    </div>
</div>

<div class="container-fluid cm-container-white section-footer">
    <a href="#cron" data-toggle="tab" class="btn btn-primary btn-lg pull-left">
        <i class="fa fa-arrow-left" aria-hidden="true"></i>
        Cron Jobs
    </a>

    <a href="#nginx" data-toggle="tab" class="btn btn-primary btn-lg pull-right">
        Nginx
        <i class="fa fa-arrow-right" aria-hidden="true"></i>
    </a>
</div>
